namespace Recast
{
	public unsafe partial class RecastGlobal
	{
		public unsafe partial class rcScopedDelete<T>
		{
			public T* ptr;
			public rcScopedDelete()/*: ptr(0)*/
			{
			}
			public rcScopedDelete(T* p)/*: ptr(p)*/
			{
				ptr = p;
			}
			~rcScopedDelete()
			{
				rcFree(ptr);
			}

			public static implicit operator T*(rcScopedDelete<T> other)
			{
				return other.ptr;
			}
			public static T* operator +(rcScopedDelete<T> num1, int num2)
			{
				return num1.ptr + num2;
			}
			public ref T this[int index]
			{
				get => ref ptr[index];
			}
			public T* Data => ptr;
		}
	}
}
